#include "gtkorientableprivate.h"
#include "gtkrange.h"
#include "gtkscale.h"
+#include "gtkcolorscale.h"
#include "gtkscrollbar.h"
#include "gtkwindow.h"
#include "gtkprivate.h"
gint focus_padding = 0;
gboolean touchscreen;
gboolean draw_trough = TRUE;
+ gboolean draw_slider = TRUE;
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
if (GTK_IS_SCALE (widget) &&
gtk_adjustment_get_upper (priv->adjustment) == gtk_adjustment_get_lower (priv->adjustment))
- draw_trough = FALSE;
+ {
+ draw_trough = TRUE;
+ draw_slider = FALSE;
+ }
+ if (GTK_IS_COLOR_SCALE (widget))
+ {
+ draw_trough = FALSE;
+ draw_slider = TRUE;
+ }
if (gtk_widget_get_can_focus (GTK_WIDGET (range)))
gtk_widget_style_get (GTK_WIDGET (range),
gtk_style_context_restore (context);
}
}
- else
- {
- gtk_render_background (context, cr,
- x, y, width, height);
- gtk_render_frame (context, cr,
- x, y, width, height);
- }
gtk_style_context_restore (context);
cairo_restore (cr);
- if (draw_trough)
+ if (draw_slider)
{
GtkStateFlags state = widget_state;